package com.wmh.baseservice.skd.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wmh.baseservice.skd.pojo.SkdCommissionsAndRewards;
import com.wmh.baseservice.skd.service.SkdCommissionsAndRewardsService;
import com.wmh.baseservice.skd.mapper.SkdCommissionsAndRewardsMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
* @author CH
* @description 针对表【skd_commissions_and_rewards(佣金和达量奖结算表)】的数据库操作Service实现
* @createDate 2023-12-05 17:45:21
*/
@Service
public class SkdCommissionsAndRewardsServiceImpl extends ServiceImpl<SkdCommissionsAndRewardsMapper, SkdCommissionsAndRewards>
    implements SkdCommissionsAndRewardsService{

    @Resource
    private SkdCommissionsAndRewardsMapper skdCommissionsAndRewardsMapper;

    /**
     * 根据团长id获取总金额
     * @param leaderId 团长id
     * @return 返回总金额
     */
    @Override
    public BigDecimal getTotalAmountByLeaderId(Long leaderId) {
        return skdCommissionsAndRewardsMapper.getTotalAmountByLeaderId(leaderId);
    }
}




